package se.jocke.nbrs.ui.node;

import java.util.List;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
import se.jocke.nbrs.model.RestServiceGroup;

/**
 *
 * @author jocke
 */
public class RestServiceGroupKeys extends Children.Keys<RestServiceGroup> {
    
    private List<RestServiceGroup> groups;

    public RestServiceGroupKeys(List<RestServiceGroup> groups) {
        this.groups = groups;
    }
    
  
    @Override
    protected void addNotify() {
        super.addNotify();        
        this.setKeys(groups);
    }
    
    @Override
    protected Node[] createNodes(RestServiceGroup key) {
        return new Node[]{new RSGroupNode(key)};
    }
    
}
